/*
 * Particle.cpp
 *
 *  Created on: 14/11/2011
 *      Author: will
 */

#include "Particle.h"

Particle::Particle(GraphEdge* root, double fraction, bool direction) {
	this->root = root;
	this->fraction = fraction;
	this->direction = direction;
	this->root->particles.push_back(this);
}

Particle::Particle() {
	root = NULL;
	fraction = 0.0;
	direction = 0;
	odoLikelihood = 0;
	visLikelihood = 0;
	weight = 0;
	hypothesis = 0;
}

Particle::~Particle() {
}

Particle::Particle(const Particle & other) {
	root = other.root;
	fraction = other.fraction;
	direction = other.direction;
	odoLikelihood = other.odoLikelihood;
	visLikelihood = other.visLikelihood;
	weight = other.weight;
	hypothesis = other.hypothesis;
}

Particle & Particle::operator=(const Particle & other) {
	root = other.root;
	fraction = other.fraction;
	direction = other.direction;
	odoLikelihood = other.odoLikelihood;
	visLikelihood = other.visLikelihood;
	weight = other.weight;
	hypothesis = other.hypothesis;
	return *this;
}
